<?php				
	interface cus_class_info
	{		
		function getCusList();
		
	}
	
	class cus_class implements cus_class_info
	{
		function cus_class()
		{
			@session_start(); 
			require_once('../../lib/'.'BaseDir.inc.htm');
			require_once(EIU_LIB.'DBCommon.class.htm');					
		}
			
		function getCusList(){

			$oDB = new DBCommon();
			$conn =  $oDB->stl_openConn();
									
			$q = "
				SELECT A.`CusID`,A.`ComName`,A.`ShortName`,A.`ComAddress`,A.`ComTel`,A.`ComFax`,A.`ParentID`,A.`BankName`,A.`BankCN`,A.`BankAcc`,A.`CreateDate`,A.`LastUpdate`,A.`ModifiedBy`,B.`ComName` AS ParentName
				FROM `cus_list_tbl` AS A LEFT JOIN `cus_list_tbl` AS B ON A.`ParentID` = B.`CusID` 
				WHERE A.`isDeleted` = 0
			";
			
			$rs = $oDB->stl_db_select($q, $conn);
			
			$oDB->stl_closeConn($conn);
			
			if($rs)	return $rs;
			else return false;		
		}	
	}
?>